----------------------------------

 


d. None  
39.Some common Resources representationsused in REST are  
a.JSON  
b.YAML  
c.XML  
d.HTML  
e. All the above R  
40.RESTfulweb services ?  
a. Defines its own security.  
b. Inherits security measures from the underlying transport. R  
c. Both of the above  
d. None of the above  
41.What is/are the advantagesof RESTful Web Services.?  
a. Language and Platformindependent  
b. REST can use SOAP  
R-A C  
c. Permits different data format  
d. All of the above  
42.Which of the following annotation of JAX RS API statesthe HTTPResponse generatedby web  
service?  
a. @DELETE  
b. @HEAD  
c. @Produces  
d. @Consumes  
R
43. _______________ isthe java API for RESTfulweb services.?  
A. JAX-RS  
B. JAX-WS  
R
C. Both of the above  
D. None of the above  
44. Select programming languagessupported by Web Services  
a. c++  
b. Java  
c. Python  
d. C  
e. All of the above  
R
45.Which two statementsare true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload. R-C E  
b. You have to implement session tracking via HTTPcookies.  
c. The WSDL defines services as collections of network endpoints.  
d. All data shared between Java and non-Java components must be in XML format.  
e. Data interchange is done via in XML.  
46.We have a Web Service that can respond with a Street name when receiving a House number.  
This service will be used on several mobile devices and size of payload should be small to consume  
less bandwidth. Which technologies can provide the best solution for this requirement? (any 3)  
a. XML R-BDE  
b. JSON  
c. JAX-WS  
d. JAX-RS  
e. HTTP  
47.Given a following code snippet of the service canyou tell what is the name of the operation in  
WSDL file?  
@
WebService(serviceName = "PayrollSystemService", name = "PayrollSystem", portName =  
"
PayrollSystemPort")  
public class PayrollSystem {  
public String getEmployeeDetails(Long empId){  
return ""dummyDetails"";  
}
}
a. getEmployeeDetails  
R
b. getEmployeeDetailsOperation  
c. getEmployeeDetailsMethod  
d. getEmployeeDetailsWebMethod  
e. getEmployeeDetailsService  
48. What is JAXB?  
a.Java API for XML Bean  
b.Java API for XML Binding  
c.Java API for XML Basics  
R
49.Response entity is defined in which package?  
a.javax.ws.rs.core.Response R  
b.javax.ws.rs.Response  
c.javax.ws.Response  
50.Which is the discovery protocol?  
a.SOAP  
b.HTTP  
c.UDDI  
d.WSDL  
R
1.Our company wants to create JAX-WS Web service client for weather forcast service. This weather  
forcast service is implemented in C++. You have given a WSDL file for service. What is correct  
statement to be able to create WS client from WSDL.  
a. Use JAXP to parse and generate the java classes from WSDL. Then create Service Endpoint  
Interface(SEI)from factoryclasses. Then use SEI to callWS.  
b. Use wsgen to generate SEI from WSDL and then invoke SEI's methods to call WS.  
c. Use wsimport to generate SEI from WSDL and then invoke SEI's methods to call WS.  
d. We can not consume a web service createdin C++ on java.  
R
2.What is an best way of the handling of application exceptions thrown by a JAX-WS service  
endpoint?  
a. Exceptions should be mapped to faults in WSDL. R  
b. Exceptions are NOT handled by JAX-WS clients.  
c. Exceptions are always propagatedto JAX-WS clients as RemoteExceptions.  
d. Exceptions are alwayspropagatedto JAX-WS clients as WebServiceExceptions.  
e. Exceptions are always propagatedto JAX-WS clients as SOAPFaultExceptions.  
3.What is the correct definition of WSDL's port element?  
a. Contains data type definitions using type system.  
b. Description of an action supported by the service.  
c. Set of operations supported by one or more Endpoints.  
d. A single endpoint defined as a combination of a binding and a network address.  
R
4.Which two statementsare true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload. R-C D  
b. You have to implement session tracking via HTTPcookies.  
c. The WSDL defines services as collections of network endpoints.  
d. Data interchange is done via XML.  
5
.We want to develop a Web Service and after developing we understood result processing cantake  
a long time to finish. So we decided to convert it to asynchronous method invocations. Is it possible  
to convert our synchronous Web Service to an asynchronous Web Service using SOAP?  
a. True R  
b.False  
6
.Which of the following code snippet matches to this WSDL portType element?  
portType name="ElementsTableImpl">  
<
<operation name="getTable">  
<input message="tns:getTable"/>  
<output message="tns:getTableResponse" />  
<fault message="tns:WsException" name="WsException" />  
</operation>  
</portType>  
a.@WebService  
public class ElementsTableImpl{  
public SimpleElementsTable getElementsTable(Integer number)throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
b.@WebService  
public class ElementsTableImpl{  
public SimpleElementsTable getTable(Integer number){  
SimpleElementsTable table = new SimpleElementsTable(number);  
returntable;  
}
}
c.@WebService (endpointInterface="ElementsTableService")  
public class ElementsTableImpl{  
public SimpleElementsTable getTable(Integer number)throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
returntable;  
}
}
d.@WebService  
R
public class ElementsTableImpl{  
public SimpleElementsTable getTable(Integer number)throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
returntable;  
}
}
7.Select HTTPmethods associate with SOAP Web service.  
a. Put  
b. Post  
c. Get  
R
d. Delete  
8.Select the operations supported by Web Services.  
a. One way (Request only)  
b. Two way(Request - Response)  
c. Solicit-Response (Server push message and client responds)  
d. Notification (Request/message from server to client)  
e. All of the above  
R
9.Select statementswhich are true for SOAP. (any 3)  
R-A B C  
a. SOAP is specification for exchanging structured information  
b. SOAP relies on other transport protocols like http, ftp for data trasmission  
c. SOAP uses xml to format data  
d. SOAP uses json to format data  
10.There are two approaches to develop a web service, depending on whether you define the  
contract first or last.  
a) True R  
b) False  
11.Incontrast, the contract-first approach encouragesyou to think of the service contract first in  
terms of :-  
a.XML  
b.XML Schema(.xsd)  
c.WSDL  
d.All of the mentioned  
R
12.Tosend objects across the wire, beans need to be encoded using the Java Architecture for XML  
Binding (JAXB).  
a.True R  
b.False  
13. Ifyou are deploying into a Java EE 5 (or better)container, you may simply create a bean that is  
annotatedwith:-  
a. javax.jws.WebService  
b. javax.jws.WebServiceProvider  
c. a&b  
R
d. none of these  
14.Tomcat doesn’t support JAX-WS by itself.  
a.True  
R
b. False  
15. Which of the following role of web service architecture implements the service and makes it  
available on the Internet?  
a. Service Provider  
b. Service Requestor  
c. Service Registry  
d. None of the above  
R
16.The simpler approach of implementing a web service is named as  
a. Entity State Transfer  
b. JavaScript EntityNotation  
c. Representation State Transfer  
d. JavaScript Object Notation  
R
17.Coding and decoding, and transporting the data is performed by  
a. XML and UDDI  
b. XML and SOAP  
c. HTML and HTTP  
d. HTML and SOAP  
R
18.Web Services are  
a.Loosely Coupled  
b.TightlyCoupled  
R
c.Either Loosely or Tightly Coupled  
d.Neither Loosely nor TightlyCoupled  
19.Which of the following is true about Web services?  
a.Webservices are open standard (XML, SOAP, HTTPetc.)based Web applications.  
b.Web services interact withother web applications for the purpose of exchanging data.  
c.Web Services can convert your existing applications into Web-applications.  
d.All of the above.  
R
20.Which of the following is correct statement about Synchronicity?  
a.Synchronicity refers to the binding of the client to the execution of the service.  
b.Insynchronous invocations, the client blocks and waits for the service to complete its operation  
before continuing.  
c.Asynchronous operations allow a client to invoke a service and then execute other functions.  
d.All of the above  
R
21.How request is sent in XML-RPC?  
a.Requestsare encoded in XML and sent via HTTPPOST.  
b.Requests are encoded in XML and sent via HTTPGET.  
c.Bothof the above.  
R
d.None of the above.  
22.Which of the following is a security issue with web services?  
a.Confidentiality  
b.Authentication  
c.NetworkSecurity  
d.All of the above R  
23.URL means ________.  
a.Address of the resource on the web R  
b.Termused to describe Website  
c.Termused to get online program  
d.None of these  
24. Rest is stateful.  
a.True  
b.False R  
25.What is the full form of JSON?  
a.JavaScript Object Native  
b.JavaScript Object Notation  
c.JavaScript Object Negation  
d.Java Object Notation  
R
26. The Service requestor provides a central place where developers can publish new services or find  
existing ones.  
a.True  
b.False R  
27. Which of the following is correctlydefining loosely coupled architecture of web service?  
a. A consumer of a web service is not tied to that web service directly.  
b. The web service interface can change over time without compromising the client's ability to  
interact with the service.  
c.Adopting a loosely coupled architecture tends to make software systems more manageable and  
allows simpler integrationbetween different systems.  
d. All of the above. R  
28. Which of the following is correct about UDDI?  
a. UDDI is an XML-based standard for describing, publishing, and finding web services.  
b.UDDI is a specification for a distributed registry of web services.  
c.UDDI isplatform independent, open framework.  
d. All of the above. R  
29.Which of the following is true about behavioral characteristicsof web services?  
a. Asynchronous clients retrieve their result at a later point in time, while synchronous clients  
receive their result when the service has completed.  
b. A web service supports RPC by providing services of its own, equivalent to those of a traditional  
component, or by translating incoming invocations into an invocation of an EJB or a .NET  
component.  
c.Web services support the transparent exchange of documents to facilitate business integration.  
d.All of the above.  
R
30.Which of the following is correct about XML Messaging layer in Web Service Protocol Stack?  
a.This layer is responsible for encoding messages in a common XML format so that messages can be  
understood at either end.  
b.Currently, this layer includes XML-RPC and SOAP.  
c.Bothof the above.  
d.None of the above.  
R
1
1
2
3
4
.Which of following statements is/are False?  
. XML overcomes the limitations in HTML to support a structured way of organizing content.  
. XML specification is not case sensitive while HTML specification is case sensitive.  
. XML supports user defined tags while HTML uses pre-defined tags.  
. XML tags need not be closed while HTML tags must be closed.  
a.2 only  
b.1 only  
c.2 and 4  
d.3 and 4  
ans:c  
2
.Consider an XML file called intro.xml and a document type defintion (DTD) file intro.dtd as  
follows:  
intro.xml  
<
<
<
<
<
?xml version = "1.0"?>  
!DOCTYPE myMessage SYSTEM "intro.dtd"›  
myMessage>  
message>Welcome to XML</message>  
/myMessage>  
intro.dtd  
<
<
! ELEMENT myMessage (message)>  
! ELEMENT message (#PCDATA)>  
A validating parser will classify intro.xml as  
a.Well-formed and validated  
b.Well-formed but not validated  
c.Validated but not well-formed  
ans:a  
3
.Given below is an excerpt of an xml specification.  
<
<
<
<
<
<
<
<
<
Book>  
title> GATE 2005 </title>  
type value = "BROCHURE"/>  
accno>10237623786</accno>  
/Book>  
Book>  
type value = "FICTION"/>  
accno>0024154807</accno>  
/Book>  
Given below are several possible excerpts from "library.dtd". For which excerpt would the  
above specification be valid?  
a.<!ELEMENT Book (title+, type, accno)>  
<
<
!ELEMENT title (#PCDATA)>  
!ELEMENT type EMPTY>  
<
!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
b.  
<
<
!ELEMENT Book (title?, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type value  
(
BROCHURE/FICTION/TECHNICAL)> <!ATTLIST accno value (#PCDATA)>  
c.  
<
<
!ELEMENT Book (title*, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type value  
(
BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
d.  
<
<
!ELEMENT Book (title?, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type EMPTY> <!ATTLIST type value  
(
BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
ans:d  
4
.Which of the following is TRUE only of XML but NOT HTML?  
a.It is derived from SGML  
b.It describes content and layout  
c.It allows user defined tags  
d.It is restricted only to be used with web browser  
ans:a,c  
5
.Which of the following statements are true with reference to the way of describing XML  
data?  
(
a)XML uses DTD to describe the data  
b)XML uses XSL to describe the data (c)  
(
XML uses a description node to describe the data Codes:  
a.(a) only  
b.(b) only  
c.(a) and (b)  
d.(a) and (c)  
ans:d  
6.In XML we can specify the frequency of an element by using the symbols:  
a.+ * !  
b.# * !  
c.+* ?  
d.-*?  
ans:c  
7
.The definitions in an XML document are said to be __________ when the tagging system and  
definitions in the DTD are all in compliance.  
a.well-formed  
b.reasonable  
c.valid  
ans:c  
8
.The behaviour of the document elements in XML can be defined by  
a.Using document object  
b.Registering appropriate event handlers  
c.Using element object  
d.All of the above  
ans:d  
9
. Which is a valid XML comment?  
a.<!– It is comment — section –>  
b.<!– It is comment section –>  
c.<!– It is comment section>  
d.<!– It is comment section –!>  
ans:b  
1
0.An XML element can contain  
a.text  
b.attributes  
c.other elements  
d. mix of the above  
ans:d  
1.In XML, you can indicate an empty element like this:  
1
a.<element></element>  
b.<element/>  
c.a and b  
d.none  
ans:c  
1
2.XML namespaces avoid element naming conflict.  
a.True b.False  
ans:a  
1
3.What is true about XML Schema?  
a. It is used to describe and validate the structure and the content of XML data.  
b. XML schema defines the elements, attributes and data types.  
c. It is similar to a database schema that describes the data in a database.  
d. All of the above  
ans:d  
1
4.How an element can be defined within an XSD?  
a. <xs:element name = "x" type = "y"/>  
b. <?xs:element name = "x" type = "y"/>  
c. <xs:element name = "x" type = "y">  
d. </xs:element name = "x" type = "y"/>  
ans:a  
1
5._______ element is used only in the context of the text.  
a. Complex Type  
b. Simple type  
c. Global Types  
d. All of the above  
ans:d  
16.Which of the following are correct predefined simple types?  
a. xs:integer  
b. xs:char  
c. xs:float  
d. xs:bool  
ans:a  
1
7.Attributes have _______ property.  
a. name  
b. type  
c. Both A and B  
d. None of the above  
ans:c  
18.Simple type Built into Schema "data" represent a date in?  
a. MM-DD-YY  
b. DD-MM-YYYY  
c. YY-MM-DD  
d. YYYY-MM-DD  
ans:d  
19. XML uses the features of  
a.HTML  
b.XHTML  
c.VML  
d.SGML  
ans:d  
2
0.What are the parsers supported in XML?  
a.non validating and validating  
b.well documented  
c.well formed  
d.none of the above  
ans:a  
2
1.Which of the following strings is a correct XML name?  
a._myElement  
b.my Element  
c.#myElement  
d.None of the above  
ans:a  
2
2.Which of the following are well formed XML fragments?  
a.< myElement myAttribute="someValue’/>  
b.< myElement myAttribute=someValue/>  
c.< myElement myAttribute=’someValue’>  
d.< myElement myAttribute="someValue"/>  
ans:d  
23.Any XML must have:-  
a.Closing tag  
b.Root element  
c.Nested child  
d.both a and b  
ans:d  
2
4.How to specify the attributes with multiple values?  
a.< myElement myAttribute="value1" myAttribute="value2"/>  
b.< myElement myAttribute="value1 value2"/>  
c.attributes cannot have multiple values  
d.< myElement myAttribute="value1, value2"/>  
ans:c  
2
5.In terms of performance, which of the following parsers are more suitable?  
a.DOM  
b.SAX  
ans:b  
2
6.Is it easier to process XML than HTML?  
a.No  
b.Yes  
c.Sometimes  
d.Can’t say  
ans:b  
2
7. In XML, what is identified by a URI reference?  
a.XML namespace  
b.XSLT  
c.Schema  
d.DLT  
ans:a  
2
8. An element is declared as ANY in the DTD as  
<
!ELEMENT BODY ANY>. Which are all valid element declaration?  
a.<BODY> sometext</BODY>  
b.<BODY>  
<
<
<
elements>  
elements>  
/BODY>  
c.<BODY>  
sometext  
<
<
<
elements>  
elements>  
/BODY>  
d.All are valid  
ans:d  
2
9.An element is declared as  
!ELEMENT test ( sample +, conclusion )> in DTD. Which element is valid in XML document?  
a.<test>  
<
<
<
<
<
sample>……..</sample>  
sample>……..</sample>  
conclusion>…</conclusion>  
/test>  
b.<test>  
<
<
conclusion>…</conclusion>  
/test>  
c.<test>  
<
<
<
sample>……..</sample>  
conclusion>…</conclusion>  
/test>  
d.<test>  
<
<
<
conclusion>…</conclusion>  
sample>……..</sample>  
/test>  
ans:a,c  
3
0.What is the meaning of this declaration in DTD?  
<
<
!ELEMENT Student ( name, age)>  
!ATTLIST Student no CDATA #REQUIRED >  
a.Student element should have two attributes name and age  
b.Student element should not have any CDATA  
c.Student element should have an attribute no  
d.Student element should have name and age as child elements,attribute no is mandatory  
ans:d  
3
1. Which of the following statements are true?  
a.DOM is event based and SAX is object based  
b.DOM is object based and SAX is event based  
c.Both are object based  
d.Both are event based  
ans:b  
3
2. Which of the following statemetns are true?  
1
.org.w3c.dom defines Document class (a DOM) as well as classes for all the components of  
a DOM  
2
.org.xml.sax defines the basic SAX APIs.  
3
.javax.xml.parsers is the JAXP APIs, which provide a common interface for different  
vendors' SAX and DOM parsers.  
a.1 and 2  
b.2 and 3  
c.1 and 3  
d. All are true  
ans:d  
3
3. State which of the following statements are true.  
1
.A resource class is a Java class that uses JAX-RS annotations to implement a  
corresponding Web resource.  
2.Resource classes are POJOs that have at least one method annotated with @Path or a  
request method designator.  
a. 1 is true and 2 is false  
b. 2 is true and 1 is false  
c. Both are true  
d. Both are false  
ans:c  
34.Which annotation is used to extract the value of a URI template parameter?  
a.@QueryParam  
b.@FormParam  
c.@PathParam  
d.@HeaderParam  
ans:c  
3
5.Only public methods may be exposed as resource methods.State True/False.  
a.True b. False  
ans:a  
3
6.Conversion between an entity body and a Java type is the responsibility of  
a.Entity  
b.EntityProvider  
c.Resource class  
d.None  
ans:b  
3
7.State whether the following statements are true/false.  
1
.The MessageBodyReader interface defines the contract between the JAX-RS runtime and  
components that provide mapping services from representations to a corresponding Java  
type.  
2.The MessageBodyWriter interface defines the contract between the JAX-RS runtime and  
components that provide mapping services from a Java type to a representation.  
a.1 only  
b.2 only  
c.1 and 2 are true  
d.1 and 2 are false  
ans:c  
38.What is the status code returned by the server for bad request?  
a.400  
b.401  
c.403  
d.404  
ans:a  
3
9.What is XSRF/CSRF?  
a.Cross Site Response Forgery  
b.Cross Site Request Forgery  
c.Cross Site Rest Forgery  
ans:b  
4
0.Entities can have hyperlinks.  
a. True b.False  
ans:a  
4
1.The URI template for a resource method is given as follows:  
http://example.com/{name1}/{name2}/. What are the valid requests that can be send from  
client?  
a.http://example.com/jay/gatsby/  
b.http://example.com/jay/  
c.http://example.com/*  
ans:a  
4
2.Which of the following are valid URI templates?  
a.http://example.com/{question}/{question}/{question}/  
b.http://example.com/maps/{location}  
c.http://example.com/{name3}/home/  
d.All are valid  
e.None of the above are valid  
ans:d  
4
3.Which of the following is valid JSON declaration to represent a user with attributes  
id,name and profession?  
a.{  
"
"
"
id":1,  
name":"Mahesh",  
profession":"Teacher"  
}
b.[  
"
"
"
id":1,  
name":"Mahesh",  
profession":"Teacher"  
]
c.{  
id:1,  
name:"Mahesh",  
profession:"Teacher"  
}
d.{  
"
"
"
id":"1",  
name":"Mahesh",  
profession":"Teacher"  
}
ans:a  
4.SOAP is not tied to any specific transport protocol.  
4
a. True b.False  
ans:a  
4
5.XML-RPC  
is the simplest XML-based protocol for exchanging information between  
computers.  
a.True b. False  
ans:a  
4
6.You are going to develop Stock market web service which will be consumed by other  
companies. Java team from your company want to re-use your web service code as soon as  
possible. Which approach you will follow in this case?  
A. Top down (contract first)  
B. Meet in the middle  
C. Bottom up (code first)  
D. None of the above  
ans:c  
4
7.Our company want to create application in which servlet will be exposed as WS endpoint.  
What we will require among following? (any 3)  
A. Application needs to be packaged as JAR file.  
B. Application needs to be packaged as WAR file.  
C. web.xml is required.  
D. webservice.xml is required.  
E. WEB-INF directory is required.  
F. META-INF directory is required.  
ans:b,c,e  
4
8.Please select incorrect statement among following statements.  
a.Confidentiality - encrypting of SOAP messages  
b.Integrity - signing of SOAP messages  
c. Authentication - attach security tokens to SOAP messages  
d. Non-repudiation - signing of SOAP messages  
e. Authorization - attach identity tokens to SOAP message  
ans:e  
4
9.What are three benefits of using SSL to connect to a Web service ? (any 3)  
a. The server is assured of the client's identity if the client issues the certificate.  
b. The client is assured of the server's identity.  
c. Message integrity is preserved between the client and the server.  
d. The communication between the client and the server is still logged.  
e. The communication between the client and the server is encrypted.  
f. Using SSL over HTTP incurs less overhead than HTTPS.  
ans:a,c,e  
5
0.Which of the following methods are not Idempotent?  
a.Get  
b.Post  
c.Put  
d.Delete  
ans:b  
5
1.Which of these are not the elements WSDL ?  
a.Types  
b.Port Type  
c.Service  
d.destination  
ans:d  
5
2. Which of these test do use an HTTP POST and will send the XML response.  
a.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38</short>  
b.<?xml ?>  
short xmlns="http://tempuri.org/">38</short>  
c.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38  
<
<
<
d.<short xmlns="http://tempuri.org/">38</short>  
ans:a  
5
3.The Web services can not offer the application components like:  
a.currency conversion  
b.weather reports  
c.language translation  
d.web browsers  
ans:d  
5
4.The XML provides the ________ in which you can write the specialized languages to  
express the complex interactions between the clients and the services or between the  
components of a composite service.  
a.language  
b.metalanguage  
c.meta  
d.services  
ans:b  
55.Schema is an _____ based alternative for DTD.  
a.XHTML  
b.XSLT  
c.XSL  
d.XML  
ans:d  
5
6.XSLT is:  
a.Extensible Stylesheet Language Translators  
b.Extended Stylesheet Language Transformation  
c.Extensible Stylesheet Language Transformation  
d.Extensible Style Language Transformation  
ans:c  
5
7.What is a web service?  
a.A standard way of integrating web-based applications  
b.One type of service that can be part of a Service Oriented Architecture  
c.Programmable XML-based service  
d.All of the above  
ans:d  
5
8. Service Transport, XML Messaging, Service Description and Service Discovery are four  
layers of  
a.web service implementing client components  
b.web service protocol stack  
c.web service supporting repository  
d.web service supporting request and response components  
ans:b  
5
9.Web Services attempts to describe architecture based on  
a.Representational State Transfer (REST)  
b.Remote Procedure Calls  
c.Reusable Application Components  
d.None of the above  
ans:a  
60.Which of the following is an open source SOAP server and client?  
a.Apache ANT  
b.Apache Tomcat  
c.Jakarta Struts  
d.Apache Axis  
ans:b  
XML Quiz  
1/55  
XML Quiz  
For each question, choose the best choice out of the given choices.  
1. What does XML stand for?  
A. X-Markup Language  
B. eXtra Modern Link  
C. Example Markup Language  
D. eXtensible Markup Language  
2. XML’s goal is to replace HTML  
A. True  
B. False  
3. What does DTD stand for?  
A. Direct Type Definition  
B. Document Type Definition  
C. Document Type Declaration  
4. Is this a correct XML document?  
<
<
<
<
<
?xml version=”1.0”?>  
to>Students</to>  
from>Teacher</from>  
heading>Reminder</heading>  
body>We are at Software Park, Thailand</body>  
A. Yes  
B. No  
5. Which statement is true?  
A. All XML elements must have a closing tag  
B. All XML documents must have a DTD or an XML schema  
C. All XML elements must be lowercase  
D. All of the statements are true  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
2/55  
6. Which statement is true?  
A. XML tags are case sensitive  
B. XML elements must be properly nested  
C. XML documents must have the root element  
D. All the statements are true  
7. XML preserves white spaces  
A. True  
B. False  
8. Is this a correct XML document?  
<
<
?xml version=”1.0”?>  
note>  
<
<
to age=19>Students</to>  
from>Teacher</from>  
</note>  
A. No  
B. Yes  
9. XML elements cannot be empty  
A. True  
B. False  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
3/55  
10.  
Which is not a correct name for an XML element?  
A. <Note>  
B. <h1>  
C. <1dollar>  
D. All 3 names are incorrect  
11.  
Which is not a correct name for an XML element?  
A. <age>  
B. <first name>  
C. <NAME>  
D. All 3 names are incorrect  
12.  
Which is not a correct name for an XML element?  
A. <xmldocument>  
B. <document>  
C. <doc>  
13. For the XML parser to ignore a certain section of your XML document,  
which syntax is correct?  
A. <xml:CDATA[ Text to be ignored]>  
B. <CDATA>Text to be ignored</CDATA>  
C. <![CDATA[ Text to be ignored ]]>  
14.  
XML is a subset of SGML  
A. True  
B. False  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
4/55  
1
5.  
XML attributes must be in double quotes  
XML attributes must be assigned values  
A. True  
B. False  
16.  
A. True  
B. False  
17.  
The Document Type Definition must be stored in an external file  
A. True  
B. False  
18.  
What can XML do?  
A. The standard for automating data exchange between systems  
B. The standard for displaying data on the Web  
C. The standard for a cross-platform programming language  
19.  
Which is false?  
A. XML is used to describe only structured data  
B. XML is used to only on the Internet  
C. XML is used to represent only simple data  
D. All of the above  
20.  
Which of the following comments are not well formed?  
A. <!-- define <source> -->  
B. <!-- define &lt;source&gt; -->  
C. <!-- declaration --- 10.27.2004 -->  
D. <!--- this is a valid comment -->  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
5/55  
21.  
Provided that the file x.dtd has the following contents. Which of the xml  
files are valid?  
!ELEMENT test (a, b)>  
!ELEMENT a ANY>  
!ELEMENT b (#PCDATA | c)*>  
!ELEMENT c EMPTY>  
!ATTLIST c valid (true | false) #IMPLIED>  
<
<
<
<
<
a. <?xml version=”1.0” encoding=”ISO-8859-1”?>  
<
<
!DOCTYPE test SYSTEM “x.dtd”>  
test>  
<a/>  
<b>text<c valid=”true”/></b>  
</test>  
b. <?xml version=”1.0 encoding=”ISO-8859-1”?>  
<
<
!DOCTYPE test SYSTEM “x.dtd”>  
test>  
<
a>Element <a>can</a>  
contain <anything/></a>  
/test>  
<
c. <?xml version=”1.0” encoding=”ISO-8859-1”?>  
<
<
!DOCTYPE a SYSTEM “x.dtd”>  
b>Sample</b>  
22.  
How can you declare in a DTD that the element x contains either the element  
a or the element b, but not both of them  
a) <!ELEMENT x a|b>  
b) <!ELEMENT x (a|b)>  
c) <!ELEMENT x (a?, b?)>  
d) It is not possible to declare in a DTD that one element contains either the element a  
or the element b, but not both of them  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
6/55  
23.  
How can you declare in a DTD that the element x contains the element a, or  
the element b, or both of them in the sequence a b.  
a) <!ELEMENT x a|b>  
b) <!ELEMENT x (a|b)>  
c) <!ELEMENT x (a?, b?)>  
d) None of the declarations above does solve the problem.  
2
4.  
attribute a or the attribute b (or both of them). The attributes contain any value.  
a) <!ELEMENT x EMTPY>  
!ATTLIST (a|b) CDATA #REQUIRED>  
How can you declare in a DTD that the empty element x has either the  
<
b) <!ELEMENT x EMPTY>  
<
<
!ATTLIST a CDATA #REQUIRED>  
!ATTLIST b CDATA #REQUIRED>  
c) <!ELEMENT x EMPTY>  
<!ATTLIST a CDATA #REQUIRED  
b CDATA #REQUIRED>  
d) It is not possible to make the presence of one attribute depend on another attribute  
2
5.  
and b and that the order of them has to be ab? The attributes can contain any value  
a) <!ELEMENT x EMPTY>  
!ATTLIST (a,b) CDATA #REQUIRED>  
How can you in a DTD declare that the element x contains both attributes a  
<
b) <!ELEMENT x EMPTY>  
!ATTLIST a CDATA #REQUIRED>  
<
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
7/55  
<!ATTLIST b CDATA #REQUIRED>  
c) <!ELEMENT x EMPTY>  
<!ATTLIST a CDATA #REQUIRED>  
b CDATA #REQUIRED>  
d) It is not possible to specify the order of attributes in a DTD. The order of attributes  
does not matter in XML.  
e) It is not possible to specify the order of attributes in a DTD. The order of  
attributes can be specified only in an XML schema.  
Valid names of elements and attributes start with a letter, an  
underscore or a colon, the following allowed characters are letters,  
numeric characters, colon, underscore, dot and hyphen (minus).  
Names which start with "xml" (in any case) are reserverd for W3C.  
The colon has a special meaning with namespaces and should not be  
used with any other semantic.  
XML_WebServices_MCQ  
1
1
.Which of following statements is/are False?  
. XML overcomes the limitations in HTML to support a structured way of  
organizing content.  
. XML specification is not case sensitive while HTML specification is case  
sensitive.  
2
3
4
. XML supports user defined tags while HTML uses pre-defined tags.  
. XML tags need not be closed while HTML tags must be closed.  
a.2 only  
b.1 only  
c.2 and 4  
d.3 and 4  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
8/55  
2.Consider an XML file called intro.xml and a document type defintion (DTD) file  
intro.dtd as follows:  
intro.xml  
<
<
<
<
<
?xml version = "1.0"?>  
!DOCTYPE myMessage SYSTEM "intro.dtd"›  
myMessage>  
message>Welcome to XML</message>  
/myMessage>  
intro.dtd  
<
<
! ELEMENT myMessage (message)>  
! ELEMENT message (#PCDATA)>  
A validating parser will classify intro.xml as  
a.Well-formed and validated  
b.Well-formed but not validated  
c.Validated but not well-formed  
3.Given below is an excerpt of an xml specification.  
<
<
<
<
<
<
<
<
<
Book>  
title> GATE 2005 </title>  
type value = "BROCHURE"/>  
accno>10237623786</accno>  
/Book>  
Book>  
type value = "FICTION"/>  
accno>0024154807</accno>  
/Book>  
Given below are several possible excerpts from "library.dtd". For which excerpt  
would the above specification be valid?  
a.<!ELEMENT Book (title+, type, accno)>  
<
<
!ELEMENT title (#PCDATA)>  
!ELEMENT type EMPTY>  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
9/55  
<!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)> <!ELEMENT  
accno (#PCDATA)>  
b.  
<!ELEMENT Book (title?, type, accno)>  
<!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type  
value (BROCHURE/FICTION/TECHNICAL)> <!ATTLIST accno value  
#PCDATA)>  
c.  
(
<
<
!ELEMENT Book (title*, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type  
value (BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
d.  
<!ELEMENT Book (title?, type, accno)>  
<!ELEMENT title (#PCDATA)> <!ELEMENT type EMPTY> <!ATTLIST type  
value (BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
.Which of the following is TRUE only of XML but NOT HTML?  
4
a.It is derived from SGML  
b.It describes content and layout  
c.It allows user defined tags (maybe)  
d.It is restricted only to be used with web browser  
5.Which of the following statements are true with reference to the way of describing  
XML data?  
(
(
a)XML uses DTD to describe the data  
b)XML uses XSL to describe the data (c)  
XML uses a description node to describe the data Codes:  
a.(a) only  
b.(b) only  
c.(a) and (b)  
d.(a) and (c)  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
10/55  
6.In XML we can specify the frequency of an element by using the symbols:  
a.+ * !  
b.# * !  
c.+* ?  
d.-*?  
7.The definitions in an XML document are said to be __________ when the tagging  
system and definitions in the DTD are all in compliance.  
a.well-formed  
b.reasonable  
c.valid  
8.The behaviour of the document elements in XML can be defined by  
a.Using document object  
b.Registering appropriate event handlers  
c.Using element object  
d.All of the above  
9. Which is a valid XML comment?  
a.<!– It is comment — section –>  
b.<!– It is comment section –>  
c.<!– It is comment section>  
d.<!– It is comment section –!>  
10.An XML element can contain  
a.text  
b.attributes  
c.other elements  
d. mix of the above  
11.In XML, you can indicate an empty element like this:  
a.<element></element>  
b.<element/>  
c.a and b  
d.none  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
11/55  
12.XML namespaces avoid element naming conflict.  
a.True b.False  
13.What is true about XML Schema?  
a. It is used to describe and validate the structure and the content of XML data.  
b. XML schema defines the elements, attributes and data types.  
c. It is similar to a database schema that describes the data in a database.  
d. All of the above  
14.How an element can be defined within an XSD?  
a. <xs:element name = "x" type = "y"/>  
b. <?xs:element name = "x" type = "y"/>  
c. <xs:element name = "x" type = "y">  
d. </xs:element name = "x" type = "y"/>  
15._______ element is used only in the context of the text.  
a. Complex Type  
b. Simple type  
c. Global Types  
d. All of the above  
16.Which of the following are correct predefined simple types?  
a. xs:integer  
b. xs:char  
c. xs:float  
d. xs:bool  
17.Attributes have _______ property.  
a. name  
b. type  
c. Both A and B  
d. None of the above  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
12/55  
18.Simple type Built into Schema "data" represent a date in?  
a. MM-DD-YY  
b. DD-MM-YYYY  
c. YY-MM-DD  
d. YYYY-MM-DD  
19. XML uses the features of  
a.HTML  
b.XHTML  
c.VML  
d.SGML  
20.What are the parsers supported in XML?  
a.non validating and validating  
b.well documented  
c.well formed  
d.none of the above  
21.Which of the following strings is a correct XML name?  
a._myElement  
b.my Element  
c.#myElement  
d.None of the above  
22.Which of the following are well formed XML fragments?  
a.< myElement myAttribute="someValue’/>  
b.< myElement myAttribute=someValue/>  
c.< myElement myAttribute=’someValue’>  
d.< myElement myAttribute="someValue"/>  
23.Any XML must have:-  
a.Closing tag  
b.Root element  
c.Nested child  
d.both a and b  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
13/55  
24.How to specify the attributes with multiple values?  
a.< myElement myAttribute="value1" myAttribute="value2"/>  
b.< myElement myAttribute="value1 value2"/>  
c.attributes cannot have multiple values  
d.< myElement myAttribute="value1, value2"/>  
25.In terms of performance, which of the following parsers are more suitable?  
a.DOM  
b.SAX  
26.Is it easier to process XML than HTML?  
a.No  
b.Yes  
c.Sometimes  
d.Can’t say  
27. In XML, what is identified by a URI reference?  
a.XML namespace  
b.XSLT  
c.Schema  
d.DLT  
28. An element is declared as ANY in the DTD as  
<!ELEMENT BODY ANY>. Which are all valid element declaration?  
a.<BODY> sometext</BODY>  
b.<BODY>  
<elements>  
<elements>  
</BODY>  
c.<BODY>  
sometext  
<elements>  
<elements>  
</BODY>  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
14/55  
d.All are valid  
29.An element is declared as  
<!ELEMENT test ( sample +, conclusion )> in DTD. Which element is valid in XML  
document?  
a.<test>  
<sample>……..</sample>  
<sample>……..</sample>  
<conclusion>…</conclusion>  
</test>  
b.<test>  
<
<
conclusion>…</conclusion>  
/test>  
c.<test>  
<sample>……..</sample>  
<conclusion>…</conclusion>  
</test>  
d.<test>  
<conclusion>…</conclusion>  
<sample>……..</sample>  
</test>  
a,c  
3
<
<
0.What is the meaning of this declaration in DTD?  
!ELEMENT Student ( name, age)>  
!ATTLIST Student no CDATA #REQUIRED >  
a.Student element should have two attributes name and age  
b.Student element should not have any CDATA  
c.Student element should have an attribute no  
d.Student element should have name and age as child elements,attribute no is  
mandatory  
31. Which of the following statements are true?  
a.DOM is event based and SAX is object based  
b.DOM is object based and SAX is event based  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
15/55  
c.Both are object based  
d.Both are event based  
3
1
2. Which of the following statemetns are true?  
.org.w3c.dom defines Document class (a DOM) as well as classes for all the  
components of a DOM  
2
3
.org.xml.sax defines the basic SAX APIs.  
.javax.xml.parsers is the JAXP APIs, which provide a common interface for  
different vendors' SAX and DOM parsers.  
a.1 and 2  
b.2 and 3  
c.1 and 3  
d. All are true  
3
1
3. State which of the following statements are true.  
.A resource class is a Java class that uses JAX-RS annotations to implement a  
corresponding Web resource.  
.Resource classes are POJOs that have at least one method annotated with @Path or  
2
a request method designator.  
a. 1 is true and 2 is false  
b. 2 is true and 1 is false  
c. Both are true  
d. Both are false  
34.Which annotation is used to extract the value of a URI template parameter?  
a.@QueryParam  
b.@FormParam  
c.@PathParam  
d.@HeaderParam  
35.Only public methods may be exposed as resource methods.State True/False.  
a.True b. False  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
16/55  
36.Conversion between an entity body and a Java type is the responsibility of  
a.Entity  
b.EntityProvider  
c.Resource class  
d.None  
3
1
7.State whether the following statements are true/false.  
.The MessageBodyReader interface defines the contract between the JAX-RS  
runtime and components that provide mapping services from representations to a  
corresponding Java type.  
2.The MessageBodyWriter interface defines the contract between the JAX-RS  
runtime and components that provide mapping services from a Java type to a  
representation.  
a.1 only  
b.2 only  
c.1 and 2 are true  
d.1 and 2 are false  
38.What is the status code returned by the server for bad request?  
a.400  
b.401  
c.403  
d.404  
39.What is XSRF/CSRF?  
a.Cross Site Response Forgery  
b.Cross Site Request Forgery  
c.Cross Site Rest Forgery  
40.Entities can have hyperlinks.  
a. True b.False  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
17/55  
41.The URI template for a resource method is given as follows:  
http://example.com/{name1}/{name2}/. What are the valid requests that can be send  
from client?  
a.http://example.com/jay/gatsby/  
b.http://example.com/jay/  
c.http://example.com/*  
42.Which of the following are valid URI templates?  
a.http://example.com/{question}/{question}/{question}/  
b.http://example.com/maps/{location}  
c.http://example.com/{name3}/home/  
d.All are valid  
e.None of the above are valid  
43.Which of the following is valid JSON declaration to represent a user with  
attributes id,name and profession?  
a.{  
"
"
"
id":1,  
name":"Mahesh",  
profession":"Teacher"  
}
b.[  
"
id":1,  
"name":"Mahesh",  
"profession":"Teacher"  
]
c.{  
id:1,  
name:"Mahesh",  
profession:"Teacher"  
}
d.{  
"
"
"
id":"1",  
name":"Mahesh",  
profession":"Teacher"  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
18/55  
}
44.SOAP is not tied to any specific transport protocol.  
a. True b.False  
45.XML-RPC is the simplest XML-based protocol for exchanging information  
between computers.  
a.True b. False  
46.You are going to develop Stock market web service which will be consumed by  
other companies. Java team from your company want to re-use your web service code  
as soon as possible. Which approach you will follow in this case?  
A. Top down (contract first)  
B. Meet in the middle  
C. Bottom up (code first)  
D. None of the above  
47.Our company want to create application in which servlet will be exposed as WS  
endpoint. What we will require among following? (any 3)  
A. Application needs to be packaged as JAR file.  
B. Application needs to be packaged as WAR file.  
C. web.xml is required.  
D. webservice.xml is required.  
E. WEB-INF directory is required.  
F. META-INF directory is required.  
B,c,e  
48.Please select incorrect statement among following statements.  
a.Confidentiality - encrypting of SOAP messages  
b.Integrity - signing of SOAP messages  
c. Authentication - attach security tokens to SOAP messages  
d. Non-repudiation - signing of SOAP messages  
e. Authorization - attach identity tokens to SOAP message  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
19/55  
49.What are three benefits of using SSL to connect to a Web service ? (any 3)  
a. The server is assured of the client's identity if the client issues the certificate.  
b. The client is assured of the server's identity.  
c. Message integrity is preserved between the client and the server.  
d. The communication between the client and the server is still logged.  
e. The communication between the client and the server is encrypted.  
f. Using SSL over HTTP incurs less overhead than HTTPS.  
A,c,e  
50.Which of the following methods are not Idempotent?  
a.Get  
b.Post  
c.Put  
d.Delete  
51.Which of these are not the elements WSDL ?  
a.Types  
b.Port Type  
c.Service  
d.destination  
5
2. Which of these test do use an HTTP POST and will send the XML response.  
a.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38</short>  
b.<?xml ?>  
short xmlns="http://tempuri.org/">38</short>  
c.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38  
d.<short xmlns="http://tempuri.org/">38</short>  
<
<
<
53.The Web services can not offer the application components like:  
a.currency conversion  
b.weather reports  
c.language translation  
d.web browsers  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
20/55  
54.The XML provides the ________ in which you can write the specialized  
languages to express the complex interactions between the clients and the services or  
between the components of a composite service.  
a.language  
b.metalanguage  
c.meta  
d.services  
55.Schema is an _____ based alternative for DTD.  
a.XHTML  
b.XSLT  
c.XSL  
d.XML  
56.XSLT is:  
a.Extensible Stylesheet Language Translators  
b.Extended Stylesheet Language Transformation  
c.Extensible Stylesheet Language Transformation  
d.Extensible Style Language Transformation  
57.What is a web service?  
a.A standard way of integrating web-based applications  
b.One type of service that can be part of a Service Oriented Architecture  
c.Programmable XML-based service  
d.All of the above  
58. Service Transport, XML Messaging, Service Description and Service Discovery  
are four layers of  
a.web service implementing client components  
b.web service protocol stack  
c.web service supporting repository  
d.web service supporting request and response components  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
21/55  
59.Web Services attempts to describe architecture based on  
a.Representational State Transfer (REST)  
b.Remote Procedure Calls  
c.Reusable Application Components  
d.None of the above  
60.Which of the following is an open source SOAP server and client?  
a.Apache ANT  
b.Apache Tomcat  
c.Jakarta Struts  
d.Apache Axis  
Web_Services_MCQ1  
1.Our company wants to create JAX-WS Web service client for weather forcast  
service. This weather forcast service is implemented in C++. You have given a  
WSDL file for service. What is correct statement to be able to create WS client from  
WSDL.  
a. Use JAXP to parse and generate the java classes from WSDL. Then create Service  
Endpoint Interface(SEI) from factory classes. Then use SEI to call WS.  
b. Use wsgen to generate SEI from WSDL and then invoke SEI's methods to call  
WS.  
c. Use wsimport to generate SEI from WSDL and then invoke SEI's methods to  
call WS.  
d. We can not consume a web service created in C++ on java.  
2.What is an best way of the handling of application exceptions thrown by a JAX-WS  
service endpoint?  
a. Exceptions should be mapped to faults in WSDL.  
b. Exceptions are NOT handled by JAX-WS clients.  
c. Exceptions are always propagated to JAX-WS clients as RemoteExceptions.  
d. Exceptions are always propagated to JAX-WS clients as WebServiceExceptions.  
e. Exceptions are always propagated to JAX-WS clients as SOAPFaultExceptions.  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
22/55  
3.What is the correct definition of WSDL's port element?  
a. Contains data type definitions using type system.  
b. Description of an action supported by the service.  
c. Set of operations supported by one or more Endpoints.  
d. A single endpoint defined as a combination of a binding and a network  
address.  
4.Which two statements are true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload.  
b. You have to implement session tracking via HTTP cookies.  
c. The WSDL defines services as collections of network endpoints.  
d. Data interchange is done via XML.  
5
.We want to develop a Web Service and after developing we understood result  
processing can take a long time to finish. So we decided to convert it to asynchronous  
method invocations. Is it possible to convert our synchronous Web Service to an  
asynchronous Web Service using SOAP?  
a. True b.False  
6
<
<
.Which of the following code snippet matches to this WSDL portType element?  
portType name="ElementsTableImpl">  
operation name="getTable">  
<input message="tns:getTable" />  
<output message="tns:getTableResponse" />  
<fault message="tns:WsException" name="WsException" />  
</operation>  
</portType>  
a.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getElementsTable(Integer number) throws  
WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
23/55  
}
b.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
c.@WebService (endpointInterface="ElementsTableService")  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
d.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
7.Select HTTP methods associate with SOAP Web service.  
a. Put  
b. Post  
c. Get  
d. Delete  
8.Select the operations supported by Web Services.  
a. One way (Request only)  
b. Two way (Request - Response)  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
24/55  
c. Solicit-Response (Server push message and client responds)  
d. Notification (Request/message from server to client)  
e. All of the above  
9.Select statements which are true for SOAP. (any 3)  
a. SOAP is specification for exchanging structured information  
b. SOAP relies on other transport protocols like http, ftp for data trasmission  
c. SOAP uses xml to format data  
d. SOAP uses json to format data  
10.There are two approaches to develop a web service, depending on whether you  
define the contract first or last.  
a) True  
b) False  
11.In contrast, the contract-first approach encourages you to think of the service  
contract first in terms of :-  
a.XML  
b.XML Schema(.xsd)  
c.WSDL  
d.All of the mentioned  
12.To send objects across the wire, beans need to be encoded using the Java  
Architecture for XML Binding (JAXB).  
a.True  
b.False  
13. If you are deploying into a Java EE 5 (or better) container, you may simply create  
a bean that is annotated with:-  
a. javax.jws.WebService  
b. javax.jws.WebServiceProvider  
c. a&b  
d. none of these  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
25/55  
14.Tomcat doesn’t support JAX-WS by itself.  
a.True  
b. False  
15. Which of the following role of web service architecture implements the service  
and makes it available on the Internet?  
a. Service Provider  
b. Service Requestor  
c. Service Registry  
d. None of the above  
16.The simpler approach of implementing a web service is named as  
a. Entity State Transfer  
b. JavaScript Entity Notation  
c. Representation State Transfer  
d. JavaScript Object Notation  
17.Coding and decoding, and transporting the data is performed by  
a. XML and UDDI  
b. XML and SOAP  
c. HTML and HTTP  
d. HTML and SOAP  
18.Web Services are  
a.Loosely Coupled  
b.Tightly Coupled  
c.Either Loosely or Tightly Coupled  
d.Neither Loosely nor Tightly Coupled  
19.Which of the following is true about Web services?  
a.Web services are open standard (XML, SOAP, HTTP etc.) based Web applications.  
b.Web services interact with other web applications for the purpose of exchanging  
data.  
c.Web Services can convert your existing applications into Web-applications.  
d.All of the above.  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
26/55  
20.Which of the following is correct statement about Synchronicity?  
a.Synchronicity refers to the binding of the client to the execution of the service.  
b.In synchronous invocations, the client blocks and waits for the service to complete  
its operation before continuing.  
c.Asynchronous operations allow a client to invoke a service and then execute other  
functions.  
d.All of the above  
21.How request is sent in XML-RPC?  
a.Requests are encoded in XML and sent via HTTP POST.  
b.Requests are encoded in XML and sent via HTTP GET.  
c.Both of the above.  
d.None of the above.  
22.Which of the following is a security issue with web services?  
a.Confidentiality  
b.Authentication  
c.Network Security  
d.All of the above  
23.URL means ________.  
a.Address of the resource on the web  
b.Term used to describe Website  
c.Term used to get online program  
d.None of these  
24. Rest is stateful.  
a.True b.False  
25.What is the full form of JSON?  
a.JavaScript Object Native  
b.JavaScript Object Notation  
c.JavaScript Object Negation  
d.Java Object Notation  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
27/55  
26. The Service requestor provides a central place where developers can publish new  
services or find existing ones.  
a.True  
b.False  
27. Which of the following is correctly defining loosely coupled architecture of web  
service?  
a. A consumer of a web service is not tied to that web service directly.  
b. The web service interface can change over time without compromising the client's  
ability to interact with the service.  
c.Adopting a loosely coupled architecture tends to make software systems more  
manageable and allows simpler integration between different systems.  
d. All of the above.  
28. Which of the following is correct about UDDI?  
a. UDDI is an XML-based standard for describing, publishing, and finding web  
services.  
b.UDDI is a specification for a distributed registry of web services.  
c.UDDI is platform independent, open framework.  
d. All of the above.  
29.Which of the following is true about behavioral characteristics of web services?  
a. Asynchronous clients retrieve their result at a later point in time, while  
synchronous clients receive their result when the service has completed.  
b. A web service supports RPC by providing services of its own, equivalent to those  
of a traditional component, or by translating incoming invocations into an invocation  
of an EJB or a .NET component.  
c.Web services support the transparent exchange of documents to facilitate business  
integration.  
d.All of the above.  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
28/55  
30.Which of the following is correct about XML Messaging layer in Web Service  
Protocol Stack?  
a.This layer is responsible for encoding messages in a common XML format so that  
messages can be understood at either end.  
b.Currently, this layer includes XML-RPC and SOAP.  
c.Both of the above.  
d.None of the above.  
Webservices_mcq  
1._______________ is used to convert your application into Web-Application.  
a. Java Service  
b.Browser Action  
c. Web Services  
d. Struts Services  
2.Web Services are _______________.  
a.Application Designing Tool  
b.Application IDE  
c.Application Components  
d.None of these  
3.The basic Web Services platform is combination of _____ and _______.  
a.CSS + JAVA  
b.CSS + HTTP  
c.XML + HTTP  
d.XML + HTML  
4.Web services communicate using __________.  
a.Open protocols  
b.Open-Close protocols  
c.Close protocols  
d.None of these  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
29/55  
5.Web services are self-contained and self-describing.  
a.False b.True  
6.Web services can be discovered using ________.  
a.UDDII b.UDDI c.UDII d.UDDDI  
7.__________ is the basis for Web services.  
a.PHP  
b.CSS  
c.CGI  
d.XML  
8.Which of the following is considered as Web Service Platform Elements ?  
a.SOAP  
b.UDDI  
c.WSDL  
d.All of these  
9.WSDL Stands for ______________________.  
a.Web Services Description Language  
b.Web Services Design Language  
c.Web Services Development Language  
d.None of these  
10.UDDI Stands for ______________________.  
a.Universal Development, Design and Integration  
b.Universal Description, Discovery and Integration  
c.Universal Description, Development and Integration  
11.Acronymn of SOAP is ______________.  
a.Simplified Object Arbitary Protocol  
b.Secure Object Access Protocol  
c.Simple Object Access Protocol  
d.None of these  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
30/55  
12.Web-services were developed in order to interact _____________ .  
a.Server  
b.Browsers  
c.Different platforms  
13.Web services use ________ to code and to decode data.  
a.XML  
b.SOAP  
c.UDDI  
d.None of these  
14.Web Services is used to -  
a.Connect existing software  
b.Reuse application-components.  
c.Solve the interoperability problem  
d. All of these  
15.SOAP is an _________ to let applications exchange information over HTTP.  
a.XML-based protocol  
b.JAVA-based protocol  
c.PHP-based protocol  
d.NET-based protocol  
16.SOAP is a _________.  
a.Protocol  
b.Markup  
c.Carrier  
d.Language  
17.SOAP is platform ___________.  
a.Dependent  
b.Independent  
c.None  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
31/55  
18.SOAP is a format for sending messages and is also called as __________.  
a.Data Transfer protocol  
b.Communication protocol (in web)  
c.Network protocol  
d.None of these  
19.SOAP is a W3C standard ! (True / False)  
a.False b.True  
20._________ is a directory for storing information about web services.  
a.SOAP  
b.CGI  
c.UDDI  
d.HTTP  
21.XML digital signatures provides  
a.Authentication  
b.Authorization  
c.Confidentiality  
d.Integrity  
22.What is RPC?  
a.Remote Process control  
b.Remote Procedure call  
c.Rempte Protocol control  
22.What is SSL?  
a.Secure Socket Layer  
b.Secured Socket Layer  
c.Standard Secured Layer  
d.Standard Socket Layer  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
32/55  
23.Select the communication channel not used in ws  
a.HTTP/POST  
b.MIME  
c.SOAP  
d.HTTP/GET  
24.What is not a part of soap message?  
a.Soap body  
b.Soap envelope  
c.Soap headers  
d.Soap footer  
25.Which of the following component of HTTP response contains metadata for the  
HTTP Response message as key-value pairs?  
a. Status/Response Code  
b. HTTP Version  
c. Response Header  
d. Response Body  
26. Which of the following HTTP method should be read only in nature?  
a.GET  
b.DELETE  
c.POST  
d.PUT  
27. Which of the following directive of Cache Control Header of HTTP response  
indicates that resource is not cachable?  
a.Public  
b.Private  
c.no-cache/no-store  
d.max-age  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
33/55  
28.Which of the following HTTP Status code means NO CONTENT, when response  
body is empty for example, a DELETE request?  
a. 200  
b. 201  
c. 204  
d. 304  
29.Which of the following annotation of JAX RS API is used to annotate a method  
used to create/update resource?  
a. @Path  
b. @GET  
c. @PUT  
d.@POST  
30. RESTful web services make use of FTP protocol as a medium of communication  
between client and server.  
a.True b.False  
31.Response Header - Contains metadata for the HTTP Response message as key-  
value pairs.  
a.True b.False  
32.Which of the following layer in Web Service Protocol Stack is responsible for  
centralizing services into a common registry and providing easy publish/find  
centralizing services into a common registry and providing easy publish/find  
functionality?  
a.Service Transport  
b.XML Messaging  
c.Service Description  
d.Service Discovery  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
34/55  
33.Annotation which allows the Jaxb2Marshaller marshaller to detect a class’s (i.e.,  
object’s) fields.  
a. XmlRootElement  
b. XmlRoot  
c. NotNull  
d. None of the mentioned  
34.Which of the following is correct about URI in RESTful web services?  
a. Each resource in REST architecture is identified by its URI  
b. Purpose of an URI is to locate a resource(s) on the server hosting the web service  
c. Both of the above  
d. None of the above  
35. Annotation added as an input parameter to the handler method  
a. PathParam  
b. Path  
c PathLocale  
d. None of the mentioned  
36. Each resource in REST architecture is identified by its URI.  
a.True b.False  
37. Explain features of XML-RPC?  
a. RPCs are performed using simple XML language  
b. XML encoded Requests are sent via HTTP POST  
c. XML Response is embedded in HTTP response  
d. All of the above  
38.XML tag which represents information related to a REST service’s request.  
a. Result  
b. Title  
c. a&b  
d. None  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
35/55  
39.Some common Resources representations used in REST are  
a.JSON  
b.YAML  
c.XML  
d.HTML  
e. All the above  
40.RESTful web services ?  
a. Defines its own security.  
b. Inherits security measures from the underlying transport.  
c. Both of the above  
d. None of the above  
41.What is/are the advantages of RESTful Web Services.?  
a. Language and Platform independent  
b. REST can use SOAP  
c. Permits different data format  
d. All of the above  
42.Which of the following annotation of JAX RS API states the HTTP Response  
generated by web service?  
a. @DELETE  
b. @HEAD  
c. @Produces  
d. @Consumes  
43. _______________ is the java API for RESTful web services.?  
A. JAX-RS  
B. JAX-WS  
C. Both of the above  
D. None of the above  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
36/55  
44. Select programming languages supported by Web Services  
a. c++  
b. Java  
c. Python  
d. C  
e. All of the above  
45.Which two statements are true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload.  
b. You have to implement session tracking via HTTP cookies.  
c. The WSDL defines services as collections of network endpoints.  
d. All data shared between Java and non-Java components must be in XML format.  
e. Data interchange is done via in XML.  
46.We have a Web Service that can respond with a Street name when receiving a  
House number. This service will be used on several mobile devices and size of  
payload should be small to consume less bandwidth. Which technologies can provide  
the best solution for this requirement? (any 3)  
a. XML  
b. JSON  
c. JAX-WS  
d. JAX-RS  
e. HTTP  
4
7.Given a following code snippet of the service can you tell what is the name of the  
operation in WSDL file?  
WebService(serviceName = "PayrollSystemService", name = "PayrollSystem",  
@
portName = "PayrollSystemPort")  
public class PayrollSystem {  
public String getEmployeeDetails(Long empId) {  
return ""dummyDetails"";  
}
}
a. getEmployeeDetails  
b. getEmployeeDetailsOperation  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
37/55  
c. getEmployeeDetailsMethod  
d. getEmployeeDetailsWebMethod  
e. getEmployeeDetailsService  
48. What is JAXB?  
a.Java API for XML Bean  
b.Java API for XML Binding  
c.Java API for XML Basics  
49.Response entity is defined in which package?  
a.javax.ws.rs.core.Response  
b.javax.ws.rs.Response  
c.javax.ws.Response  
50.Which is the discovery protocol?  
a.SOAP  
b.HTTP  
c.UDDI  
d.WSDL  
XML_MCQ_Test2  
1.How to declare element with minimum one occurrence?  
a.<! ELEMENT element-name(element-content+)>  
b.<! ELEMENT element-name(element-content+)!>  
c.<! ELEMENT element-name(element-content)!>  
d.None of the listed options  
2.Which of the following XML statement is valid?  
a.<message> if price<60</message>  
b.<message> if price lt 60 </message>  
c.<message> if price &lt; 60</message>  
d.None of the listed options  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
38/55  
3.DTD stands for  
a.Document Type Definition  
b.Direct Type Definition  
c.Dynamic Type Definition  
d.None of these  
4.Which of the following correctly defines use of DTD in XML development?  
a.DTD are used by parsers for validating the structure of the XML  
b.DTD are used as contract between two systems to interoperate.  
c.An Application can use the DTD to validate the XML structure it has received from  
external systems  
d.All the above  
5.Any text that should not be parsed by the xml parser needs to declare as:  
I: PCDATA  
II: CDATA  
a.I  
b.II  
c.Both I and II  
d. None of the above  
6.What is an XML instance  
a.An XML Document  
b.An XML element  
c.An XML attribute  
7
1
2
3
.What are the uses of XML parsers?  
.Parsing XML files and retrieving data from XML elements  
.Creating XML files programmatically  
.Used to direct conversion using an XSLT processor  
a.1&2  
b.2  
c.1&3  
d.2&3  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
39/55  
8.Which parser reads small chunk of document at a time,parses it, generate an events  
and then reads another chunk of document?  
a.DOM  
b.SAX  
c.Both  
d.none  
9.Which defines standard set of objects for creating XML's?  
a.SAX  
b.XML DOM  
c.XML  
d.SAX DOM  
10.Which type of parser is suitable,when applications is required to read data without  
modifying the content?  
a.DOM  
b.SAX  
c.Both  
d.None  
11.Which statement creates DocumentBuilder instance?  
a.DocumentBuilder b=new DocumentBuilder();  
b.DocumentBuilder b=new Builder();  
c.DocumentBuilder b=factory.new DocumentBuilder();  
d.None  
12.What does XSL stands for?  
a.Extensive Style sheet language  
b.Extensible Style Language  
c.Extensible Style Sheet Language  
d.None  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
40/55  
13.Which statement creates DocumentBuilderFactory instance?  
a.DocumentBuilderFactory f=new DocumentBuilderFactory();  
b.DocumentBuilderFactory f= BuilderFactory.newInstance();  
c.DocumentBuilderFactory f=DocumentBuilderFactory.newInstance();  
14.Which language is used for formatting XML documents?  
a.XSL  
b.XSLT  
c.XSL-FO  
15.Which is used to transform XML document?  
a.Xpath  
b.XSLT  
c.XML  
d.XSL  
1
1
2
3
6.What are the two common exceptions in JAXP?  
.ParserConfigurationException  
.FactoryConfigurationException  
.FactoryConfigurationError  
a.1&2  
b.3  
c.1&3  
d.1  
17.JAXP Stands for  
a.Java API eXtensive processing  
b.Java API eXtensible Processing  
c.Java API for XML Processing  
d.Java API for XML Parsing  
18.In which package JAXP related API's are available?  
a.javax.xml.parsers.*;  
b.javax.xml.*;  
c.javax.parsers.xml.*;  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
41/55  
19.Which complex type specifies that the elements should always be in the order  
specified?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/></xs:all>  
</xs:complexType>  
b.<xs:complexType name="CountrInfo"><xs:choice> <xs:element  
name="countryName" type="xs:string"/>  
<
xs:element name="states" type="xs:integer"/></xs:choice>  
/xs:complexType>  
c.<xs:complexType name="CountrInfo">  
<
<xs:sequence> <xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/>  
</xs:sequence></xs:complexType>  
20.Which statement specifies a constant value for a simple element?  
a.<xs:element name="CountryName" type="xs:string" constant="India"/>  
b.<xs:element name="CountryName" type="xs:string" fixed="India"/>  
c.<xs:element name="CountryName" type="xs:string" fixedvalue="India"/>  
21.Which complex type signifies that only one of the child elements can appear?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/> <xs:element name="states"  
type="xs:integer"/></xs:all>  
/xs:complexType>  
b.<xs:complexType name="CountrInfo">  
<
<
<
<
<
xs:choice>  
xs:element name="countryName" type="xs:string"/>  
xs:element name="states" type="xs:integer"/>  
/xs:choice></xs:complexType>  
c.<xs:complexType name="CountrInfo">  
xs:sequence> <xs:element name="countryName" type="xs:string"/>  
<
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
42/55  
<xs:element name="states" type="xs:integer"/></xs:sequence></xs:complexType>  
22.Which method of DocumentBuilder is used to parse the xml file?  
a.parse  
b.read  
c.parseXML  
23.In XML DOM every XML element is treated as Node.  
a.True b.False  
24.Which method is used to get the element type of a XML document?  
a.node.getNodeType()  
b.node.getElementType()  
c.node.getType()  
25.Which statement is true?  
a.All XML elements must be lower case  
b.All XML documents must have a DTD  
c.All XML elements must be properly closed  
d.All the statements are true  
26.Which statement is NOT true?  
a.White-space is not preserved in XML  
b.XML documents must have a root tag  
c.XML tags are case sensitive  
d.XML elements must be properly nested  
27.XML elements cannot be empty  
a.False b.True  
28.Which is not a correct name for an XML element?  
a.<1dollar>  
b.<h1>  
c.<Note>  
d.All 3 names are incorrect  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
43/55  
28.For the XML parser to ignore a certain section of your XML document, which  
syntax is correct?  
a.<![CDATA[ Text to be ignored ]]>  
b.<CDATA> Text to be ignored </CDATA>  
c.<xml:CDATA[ Text to be ignored ]>  
d.<PCDATA> Text to be ignored </PCDATA>  
29.What are XML entities used for?  
a.Entities define shortcuts to standard text or special characters  
b.Entities define shortcuts to standard elements  
c.Entities define shortcuts to standard attributes  
30. Which XML DOM object represents a node in the node tree?  
a.The node object  
b.The nodeList object  
c.The document object  
XML_Mcq_Test  
1.Which are the main features of XML?  
a. Text data description  
b. Human- and computer-friendly format  
c. Handles data in a tree structure having one-and only one-root element  
d. All mentioned above  
2.Which is a language for finding information in an XML document?  
a. Xpath  
b. XSLT  
c. XLink  
d. XPointer  
3.Find the correct syntax of the declaration which defines the XML Version?  
a. < ?xml version= "1.0" ? >  
b. < xml version="1.0"/ >  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
44/55  
c. < ?xml version="1.0" / >  
d. None of the above  
4.An XML DOM parser converts an XML document into an XML DOM object,  
which can then be manipulated with JavaScript.  
a.True b.False  
5. Abbreviate the term DOM?  
a. Developed Object Model  
b. Document Object Model  
c. Document Oriented Model  
6.Which language is case sensitive?  
a. HTML  
b. XML  
c. Both A & B  
d. None of the above  
7.Which parser is read only?  
a.DOM  
b.SAX  
c.Both  
d.None  
8.The getElementsByTagName() method is used to retrieve data from an XML  
document.  
a. True  
b. False  
9. The following example shows which XML Syntax rule,  
<
<
<
<
note date=" 12/11/2007">  
to>Tove< /to>  
from>Jani< /from>  
/note>  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
45/55  
(all options)  
a. XML Attribute Values Must be Quoted  
b. All XML Elements Must Have a Closing Tag  
c. XML Tags are Case Sensitive  
d. XML Elements Must be Properly Nested  
10. XML is ?  
a. Platform Independent  
b. Language Independent  
c. Both A & B  
d. None of the above  
11. Which are the techniques for defining the structure of a specific type of XML  
documents?  
a. Schema  
b. DTD  
c. Both A & B  
d. None of the above  
12.Which is not a XML function?  
a. Transport information  
b. Style information  
c. Store information  
d. Structure information  
13. Is this a 'well formed' XML document?  
<
<
<
<
<
?xml version="1.0"? >  
note >  
to age="29" >John< /to >  
from >Smiley< / from >  
/ note >  
a. True  
b. False  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
46/55  
14.Which character in the XML Element will generate an error because the parser  
interprets it as the start of a new element?  
a. " < "  
b. "&"  
c. Both A & B  
d. None of the above  
15. Which is not a W3C-recommended specification?  
a. SAX  
b. DOM  
c. Both A & B  
d. None of the above  
16. Which internet language is used for describing available web services in XML?  
a. WSDL  
b. RSS  
c. RDF  
d. OWL  
17.XML is the most common tool for data transmissions between all sorts of  
applications  
a. True  
b. False  
18. Which is a software- and hardware-independent tool for carrying information?  
a. HTML  
b. XML  
c. Both A & B  
d. None of the above  
19.Which Characters are illegal in XML elements?  
a. " < "  
b. "&"  
c. Both A & B  
d. None of the above  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
47/55  
20. What is XML used to simplify?  
a. Data storage  
b. Data sharing  
c. Both A & B  
d. None of the above  
21.Which are the XML Syntax rules?  
a. All XML Elements Must Have a Closing Tag  
b. XML Tags are not Case Sensitive  
c. XML Elements Must be Properly Nested  
d. Both A & C  
22. XML documents must contain a root element; this element is "the parent" of all  
other elements  
a. True  
b. False  
23.XML is designed to store data and _____.  
a. Design  
b. Verify  
c. Transport  
d. Both A & B  
24.XML attribute values must always be enclosed in quotes  
a. True  
b. False  
25.XML is designed to carry data, and to display data  
a. True  
b. False  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
48/55  
26.In XML document comments are given as?  
a. < !-- -->  
b. < !-- ?  
c. < /-- -->  
d. < ?-- ?  
27.Which of the following is true about SAX parsing?  
a. SAX parser reads an XML document from top to bottom, recognizing the tokens  
that make up a well-formed XML document.  
b. SAX parser reports the application program the nature of tokens that the parser has  
encountered as they occur  
c. The application program provides an 'event' handler that must be registered with  
the parser.  
d.All of the above.  
28.Which of the following method get called when element ends in SAX parsing?  
a. startDocument()  
b.endDocument()  
c.startElement()  
d. endElement()  
29. Which method of JDOM Parser gets the root element of the XML?  
a. Element.getRootElement()  
b. Document.getRootElement()  
c. Node.getRootElement()  
d.Node.getChild(Name)  
30.Which technology provides the flexibility to swap between XML processors with  
no application code changes?  
a. JAAS  
b. SAX  
c. XSLT  
d. JAXP  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
49/55  
Blog Restfull soap  
1) Which of the following transport protocols are complient with SOAP  
A. HTTP  
B. SMTP  
C. FTP  
D. TCP  
E. All of the above  
Ans - E  
2) Select HTTP methods associate with SOAP Web service.  
A. Put  
B. Post  
C. Get  
D. Delete  
Ans - B  
Desc - SOAP only uses POST method for HTTP communication.  
3) Select Web Service technology stack from following options (any 3)  
A. SOAP  
B. JSON  
C. JAX-RS  
D. WSDL  
E. UDDI  
Ans - ADE  
4) Select correct definition of a WSDL's <service> element.  
A. Collection of related endpoints.  
B. Contains data type definitions using type system.  
C. A single endpoint defined as a combination of a binding and a network address.  
D. Set of operations supported by one or more Endpoints.  
Ans - A  
5) Select the operations supported by Web Services.  
A. One way (Request only)  
B. Two way (Request - Response)  
C. Solicit-Response (Server pust message and client responds)  
D. Notification (Request/push message from server to client)  
E. All of the above  
Ans - E  
6) Select statements which are true for SOAP. (any 3)  
A. SOAP Transport protocol used by Web Services  
B. SOAP is specification for exchanging structured information  
C. SOAP relies on other trasport protocols like http, ftp for data trasmission  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
50/55  
D. SOAP uses xml to format data  
E. SOAP uses json to format data  
Ans - BCD  
7) You are going to develop Stock market web service which will be consumed by other companies.  
Jave team from your company want to re-use your web service code as soon as possible. Which  
approach you will follow in this case?  
A. Top down (contract first)  
B. Meet in the middle  
C. Bottom up (code first)  
D. None of the above  
Ans - C  
Desc - In bottom up approach you start with writing service code so code will be available earliest  
for other teams using this approach.  
8) Our company wants to create JAX-WS Web service client for weather forcast service. This  
weather forcast service is implemented in C++. You have given a WSDL file for service. What is  
correct statement to be able to create WS client from WSDL. (Select one).  
A. Use JAXP to parse and generate the java classes from WSDL. Then create Service Endpoint Interface(SEI)  
from factory classes. Then use SEI to call WS.  
B. Use wsgen to generate SEI from WSDL and then invoke SEI's methods to call WS.  
C. Use wsimport to generate SEI from WSDL and then invoke SEI's methods to call WS.  
D. We can not consume a web service created in C++ on java.  
Ans - C  
Desc - To create WS client from WSDL we use wsimport tool. Wsgen is used to create web service from WSDL.  
9) Our company want to create application in which servlet will be exposed as WS endpoint. What  
we will require among following? (any 3)  
A. Application needs to be packaged as JAR file.  
B. Application needs to be packaged as WAR file.  
C. web.xml is required.  
D. webservice.xml is required.  
E. WEB-INF directory is required.  
F. META-INF directory is required.  
Ans - BCE  
Desc - We need to package application as WAR file to deploy in web container. We need WEB-INF/web.xml file  
inside WAR file.  
10) Our company has created web service for employee payroll system which is deployed in Web  
container. Now we have new requirements from management to protect access to this service URL  
using basic authentication. Which file we need to modify to fulfill this requirement?  
A. security.xml  
B. sun-web.xml  
C. web.xml  
D. webservices.xml  
Ans - C  
Desc - We have to update web.xml with security configurations for URLS. This is xml element we need to add in  
web.xml <auth-method>basic</auth-method>  
11) Select the feature provided by EJB endpoint exposed as a web service. (any 3)  
A. Client Managed Transactions  
B. Java EE declarative Security  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
51/55  
C. Java EE programatic Security  
D. HTTP Sessions  
E. Container Managed transactions.  
Ans - ACE  
Desc - Exposing EJB bean as WS endpoint we can use declarative security using EJB annotation, programmatic  
security and EJB container managed transactions.  
12) We have created one web service which is deployed in web container, now we need to support  
WS client session in our service. However we have to expire a session in case user session is  
inactive for 10 mins. Which file we need to modify for this requirement.  
A. security.xml  
B. sun-web.xml  
C. web.xml  
D. webservices.xml  
Ans - C  
Desc - We need to add <session-config><session-timeout>10</session-timeout></session-config> in web.xml  
file.  
13) What is the correct web.xml-snippet to declare a session time-out of 3 minutes in web.xml?  
A. <session-config> <session-timeout>3</session-timeout> </session-config>  
B. <session-config> <session-timeout>180</session-timeout> </session-config>  
C. <session-timeout> <session-time>3</session-time> </session-timeout>  
D. <session-timeout> <session-time>180</session-time> </session-timeout>  
Ans - A  
14) Select programming languages supported by Web Services  
A. c++  
B. Java  
C. Python  
D. C  
E. All of the above  
Ans - E  
15) What is an best way of the handling of application exceptions thrown by a  
JAX-WS service endpoint?  
A. Exceptions should be mapped to faults in WSDL.  
B. Exceptions are NOT handled by JAX-WS clients.  
C. Exceptions are always propagated to JAX-WS clients as RemoteExceptions.  
D. Exceptions are always propagated to JAX-WS clients as WebServiceExceptions.  
E. Exceptions are always propagated to JAX-WS clients as SOAPFaultExceptions.  
Ans - A  
20) What is the correct definition of WSDL's port element?  
A. Contains data type definitions using type system.  
B. Description of an action supported by the service.  
C. Set of operations supported by one or more Endpoints.  
D. A single endpoint defined as a combination of a binding and a network address.  
Ans - D  
Desc - PortType element contains supported binding, literals by endpoint and networ address of endpoint.  
21) Select one of the use of javax.xml.ws.BindingProvider interface while working with JAX-WS.  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
52/55  
A. Set custom Hadlers chain  
B. Set UserName and Password used for BASIC Authentication  
C. Validate SOAP request message against xml schema  
D. Validate SOAP response message against xml schema  
22) We have configured a number of Handlers in our Web Service. This is the order of the handlers  
in the configuration file:  
1. LogicalHandler 1  
2. LogicalHandler 2  
3. SOAPHandler 1  
4. SOAPHandler 2  
What will be the order of execution on an outbound message?  
A. LogicalHandler 1 - SOAPHandler 1 - LogicalHandler 2 - SOAPHandler 2  
B. SOAPHandler 1 - SOAPHandler 2 - LogicalHandler 1 - LogicalHandler 2  
C. LogicalHandler 1 - LogicalHandler 2 - SOAPHandler 1 - SOAPHandler 2  
D. SOAPHandler 2 - SOAPHandler 1 - LogicalHandler 2 - LogicalHandler 1  
E. None of above.  
Ans - C  
Desc - For outgoing message first logical handlers gets executed then SOAPHandlers. And reverse for Inbound  
message.  
23) Please select incorrect statement among following statements.  
A. Confidentiality - encrypting of SOAP messages  
B. Integrity - signing of SOAP messages  
C. Authentication - attach security tokens to SOAP messages  
D. Non-repudiation - signing of SOAP messages  
E. Authorization - attach identity tokens to SOAP message  
Ans - E  
24) Which two statements are true about the Web services? (any 2)  
A. SOAP messages are compressed during transport to reduce size of payload.  
B. You have to implement session tracking via HTTP cookies.  
C. The WSDL defines services as collections of network endpoints.  
D. All data shared between Java and non-Java components must be in XML format.  
E. Data interchange is doen via in XML.  
Ans - CE  
25) We have a Web Service that can respond with a Street name when receiving a House number.  
This service will be used on several mobile devices and size of payload should be small to consume  
less bandwidth. Which technologies can provide the best solution for this requirement. (any 3)  
A. XML  
B. JSON  
C. JAX-WS  
D. JAX-RS  
E. HTTP  
Ans - BDE  
26) What are three benefits of using SSL to connect to a Web service without mutual  
authentication. (any 3)  
A. The server is assured of the client's identity if the client issues the certificate.  
B. The client is assured of the server's identity.  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
53/55  
C. Message integrity is preserved between the client and the server.  
D. The communication between the client and the server is still logged.  
E. The communication between the client and the server is encrypted.  
F. Using SSL over HTTP incurs less overhead than HTTPS.  
Ans - ACE  
27) We want to develop a Web Service and after developing we understood result processing can  
take a long time to finish. So we decided to convert it to asynchronous method invocations. What  
steps we need to perform to convert our synchronous Web Service to an asynchronous Web Service?  
(any 2)  
A. An asynchronous transport protocol to facilitate the asynchronous invocations.  
B. The client providing a ReplyTo-address for the response.  
D. A correlation identifier in order to relate the request and response.  
E. The client providing a From-address in order for the Web Service to facilitate asynchronous processing.  
Ans - BD  
28) Given a following code snippet of the service can you tell what is the name of the operation in  
WSDL file?  
@WebService(serviceName = ""PayrollSystemService"", name = ""PayrollSystem"", portName =  
""PayrollSystemPort"")  
public class PayrollSystem {  
public String getEmployeeDetails(Long empId) {  
return ""dummyDetails"";  
}
}
A. getEmployeeDetails  
B. getEmployeeDetailsOperation  
C. getEmployeeDetailsMethod  
D. getEmployeeDetailsWebMethod  
E. getEmployeeDetailsService  
Ans - A  
Desc - Default value of the operation name is the name of the method. You can modify the name of the  
operation using @WebMethod annotation.  
29) What is the correct WSDL generated from this Web Service declaration:  
@WebService (name=""TaxiService"", portName=""TaxiPort"", serviceName=""TaxiWebService"") public  
class TaxiServiceImpl { public void taxi(String msg) {  
System.out.println(msg);  
}
}
A. <definitions> . . .  
<portType name=""TaxiWebService""> . . .</portType>  
<binding name=""TaxiPortBinding"" type=""...""> . . . </binding>  
<service name=""TaxiServiceImplService"">  
<port name=""TaxiPort"" binding=""tns:TaxiPortBinding""> . . . </port>  
</service>  
</definitions>  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
54/55  
B. <definitions> . . .  
<portType name=""TaxiService""> . . .</portType>  
<binding name=""TaxiPortPortBinding"" type=""...""> . . . </binding>  
<service name=""TaxiWebService"">  
<port name=""TaxiPortPort"" binding=""tns:TaxiPortPortBinding""> . . . </port>  
</service>  
</definitions>  
C. <definitions>  
. .  
.
<
<
<
portType name=""TaxiService""> . . .</portType>  
binding name=""TaxiServiceImplPortBinding"" type=""...""> . . . </binding>  
service name=""TaxiServiceImplService"">  
<port name=""TaxiServicePort"" binding=""tns:TaxiServiceImplPortBinding""> . . . </port>  
</service>  
</definitions>  
D. <definitions>  
. .  
.
<portType name=""TaxiService""> . . .</portType>  
<binding name=""TaxiPortBinding"" type=""...""> . . . </binding>  
<service name=""TaxiWebService"">  
<port name=""TaxiPort"" binding=""tns:TaxiPortBinding""> . . . </port>  
</service>  
</definitions>  
Ans - D  
30) Which of the following code snippet matches to this WSDL portType element?  
<
portType name=""ElementsTableImpl"">  
<
operation name=""getTable"">  
<
input message=""tns:getTable"" />  
<
<
output message=""tns:getTableResponse"" />  
fault message=""tns:WsException"" name=""WsException"" />  
</operation>  
</portType>  
A. @WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getElementsTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
B. @WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) {  
Java Web Services, Software Park, Thailand, 2004  
XML Quiz  
55/55  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
C. @WebService (endpointInterface=""ElementsTableService"")  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
D. @WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
Ans - D  
Java Web Services, Software Park, Thailand, 2004  
1.Which are the main features of XML?  
a. Text data description  
b. Human- and computer-friendly format  
c. Handles data in a tree structure having one-and only one-root element  
d. All mentioned above R  
2.Which is a language for finding information in an XML document?  
a. Xpath  
b. XSLT  
R
c. XLink  
d. XPointer  
3.Find the correct syntax of the declarationwhich defines the XML Version?  
a. < ?xml version= "1.0" ? >  
b. < xml version="1.0"/ >  
c. < ?xml version="1.0" / >  
d. None of the above  
R
4.An XML DOM parser converts an XML document into an XML DOM object, which can then be  
manipulated with JavaScript.  
a.True  
b.False  
R
5. Abbreviate the termDOM?  
a. Developed Object Model  
b. Document Object Model  
c. Document Oriented Model  
R
6.Which language is case sensitive?  
a. HTML  
b. XML  
R
c. Both A & B  
d. None of the above  
7.Which parser is readonly?  
a.DOM  
b.SAX  
R
c.Both  
d.None  
8.The getElementsByTagName()methodis used to retrieve data from an XML document.  
a. True  
b. False  
R
9
<
<
<
<
. The following example shows which XML Syntax rule,  
note date=" 12/11/2007">  
to>Tove< /to>  
from>Jani< /from>  
/note>  
a. XML Attribute Values Must be Quoted R  
b. All XML Elements Must Have a Closing Tag  
c. XML Tagsare Case Sensitive  
d. XML ElementsMust be Properly Nested  
10. XML is ?  
a. Platform Independent  
b. Language Independent  
c. Both A & B  
R
d. None of the above  
11. Which are the techniques for defining the structure of a specific type of XML documents?  
a. Schema  
b. DTD  
c. Both A & B  
R
d. None of the above  
12.Which is not a XML function?  
a. Transport information  
b. Style information  
c. Store information  
R
d. Structure information  
1
<
<
<
<
<
3. Isthis a 'well formed' XML document?  
?xml version="1.0"?>  
note >  
to age="29" >John< /to >  
from >Smiley< / from >  
/ note >  
a. True  
b. False  
R
14.Which character in the XML Element will generate anerror because the parser interpretsit as the  
start of a new element?  
a. " < " R  
b. "&"  
c. Both A & B  
d. None of the above  
15. Which is not a W3C-recommended specification?  
a. SAX R  
b. DOM  
c. Both A & B  
d. None of the above  
16. Which internet language is used for describing available web services in XML?  
a. WSDL R  
b. RSS  
c. RDF  
d. OWL  
17.XML is the most common tool for data transmissions between all sorts of applications  
a. True R  
b. False  
18. Which is a software- and hardware-independent tool for carrying information?  
a. HTML  
b. XML R  
c. Both A & B  
d. None of the above  
19.Which Charactersare illegalin XML elements?  
a. " < "  
b. "&"  
c. Both A & B R  
d. None of the above  
20. What is XML used to simplify?  
a. Data storage  
b. Data sharing  
c. Both A & B  
R
d. None of the above  
21.Which are the XML Syntax rules?  
a. All XML Elements Must Have a Closing Tag  
b. XML Tagsare not Case Sensitive  
c. XML Elements Must be Properly Nested  
d. BothA & C  
R
22. XML documents must contain a root element; this element is "the parent" of all other elements  
a. True R  
b. False  
23.XML is designed to store data and _____.  
a. Design  
b. Verify  
c. Transport R  
d. BothA & B  
24.XML attribute values must always be enclosed in quotes  
a. True  
b. False  
R
25.XML is designed to carry data, andto display data  
a. True  
b. False  
R
26.InXML document comments are given as?  
a. < !-- --> R  
b. < !-- ?  
c. < /-- -->  
d. < ?-- ?  
27.Which of the following is true about SAX parsing?  
a. SAX parser reads an XML document from top to bottom, recognizing the tokens that make up a  
well-formed XML document.  
b. SAX parser reports the application programthe nature of tokens that the parser has encountered  
as they occur  
c. The application program provides an 'event' handler that must be registeredwith the parser.  
d.All of the above.  
R
28.Which of the following method get calledwhen element ends in SAX parsing?  
a. startDocument()  
b.endDocument()  
c.startElement()  
d. endElement()  
R
29. Which method of JDOM Parser gets the root element of the XML?  
a. Element.getRootElement()  
b. Document.getRootElement() R  
c. Node.getRootElement()  
d.Node.getChild(Name)  
30.Which technology provides the flexibility to swap between XML processors with no application  
code changes?  
a. JAAS  
b. SAX  
c. XSLT  
d. JAXP  
R
1.How to declare element with minimum one occurrence?  
a.<! ELEMENT element-name(element-content+)> R  
b.<! ELEMENT element-name(element-content+)!>  
c.<! ELEMENT element-name(element-content)!>  
d.None of the listed options  
2.Which of the following XML statement is valid?  
a.<message> if price<60</message>  
b.<message> if price lt 60 </message>  
c.<message> if price &lt; 60</message> R  
d.None of the listed options  
3.DTD stands for  
a.Document Type Definition R  
b.Direct Type Definition  
c.Dynamic Type Definition  
d.None of these  
4.Which of the following correctly defines use of DTD in XML development?  
a.DTD are used by parsers for validating the structure of the XML  
b.DTD are used as contract betweentwo systems to interoperate.  
c.An Application can use the DTD to validate the XML structure it has received from externalsystems  
d.All the above R  
5.Any text that should not be parsed by the xml parser needs to declare as:  
I: PCDATA  
II: CDATA R  
a.I  
b.II  
c.BothI and II  
d. None of the above  
6.What is an XML instance  
a.AnXML Document R  
b.An XML element  
c.An XML attribute  
7
1
2
3
.What are the uses of XML parsers?  
.Parsing XML files and retrieving data from XML elements  
.Creating XML files programmatically  
R
.Used to direct conversion using an XSLT processor  
a.1&2  
b.2  
c.1&3  
d.2&3  
8.Which parser reads small chunk of document at a time,parsesit, generate anevents and then  
reads another chunk of document?  
a.DOM  
b.SAX R  
c.Both  
d.none  
9.Which defines standard set of objects for creating XML's?  
a.SAX  
b.XML DOM R  
c.XML  
d.SAX DOM  
10.Which type of parser is suitable,when applications is required to read data without modifying the  
content?  
a.DOM  
b.SAX R  
c.Both  
d.None  
11.Which statement creates DocumentBuilder instance?  
a.DocumentBuilder b=new DocumentBuilder();  
b.DocumentBuilder b=new Builder();  
c.DocumentBuilder b=factory.new DocumentBuilder(); R  
d.None  
12.What does XSL stands for?  
a.Extensive Style sheet language  
b.Extensible Style Language  
c.Extensible Style Sheet Language R  
d.None  
13.Which statement createsDocumentBuilderFactoryinstance?  
a.DocumentBuilderFactoryf=new DocumentBuilderFactory();  
b.DocumentBuilderFactoryf= BuilderFactory.newInstance();  
c.DocumentBuilderFactoryf=DocumentBuilderFactory.newInstance(); R  
14.Which language is used for formatting XML documents?  
a.XSL R  
b.XSLT  
c.XSL-FO  
15.Which is used to transformXML document?  
a.Xpath  
b.XSLT R  
c.XML  
d.XSL  
1
6.What are the two common exceptions in JAXP?  
.ParserConfigurationException  
1
2
.FactoryConfigurationException  
.FactoryConfigurationError  
3
a.1&2  
b.3  
c.1&3 R  
d.1  
17.JAXP Stands for  
a.Java API eXtensive processing  
b.Java API eXtensible Processing  
c.Java API for XML Processing R  
d.Java API for XML Parsing  
18.Inwhich package JAXP relatedAPI's are available?  
a.javax.xml.parsers.*; R  
b.javax.xml.*;  
c.javax.parsers.xml.*;  
19.Which complex type specifies that the elementsshould always be in the order specified?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/></xs:all>  
</xs:complexType>  
b.<xs:complexType name="CountrInfo"><xs:choice> <xs:element name="countryName"  
type="xs:string"/>  
<xs:element name="states" type="xs:integer"/></xs:choice>  
</xs:complexType>  
c.<xs:complexType name="CountrInfo">  
R
<
<
<
xs:sequence> <xs:element name="countryName" type="xs:string"/>  
xs:element name="states" type="xs:integer"/>  
/xs:sequence></xs:complexType>  
20.Which statement specifies a constant value for a simple element?  
a.<xs:element name="CountryName" type="xs:string" constant="India"/>  
b.<xs:element name="CountryName" type="xs:string" fixed="India"/>  
R
c.<xs:element name="CountryName" type="xs:string" fixedvalue="India"/>  
21.Which complex type signifies that only one of the child elements can appear?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/> <xs:element name="states"  
type="xs:integer"/></xs:all>  
</xs:complexType>  
b.<xs:complexType name="CountrInfo">  
R
<
<
<
<
xs:choice>  
xs:element name="countryName" type="xs:string"/>  
xs:element name="states" type="xs:integer"/>  
/xs:choice></xs:complexType>  
c.<xs:complexType name="CountrInfo">  
<xs:sequence> <xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/></xs:sequence></xs:complexType>  
22.Which method of DocumentBuilder is used to parse the xml file?  
a.parse R  
b.read  
c.parseXML  
23.InXML DOM every XML element is treatedas Node.  
a.True R  
b.False  
24.Which method is used to get the element type of a XML document?  
a.node.getNodeType() R  
b.node.getElementType()  
c.node.getType()  
25.Which statement is true?  
a.All XML elements must be lower case  
b.All XML documents must have a DTD  
c.All XML elements must be properly closed  
d.All the statementsare true  
R
26.Which statement is NOT true?  
a.White-space is not preserved in XML R  
b.XML documents must have a root tag  
c.XML tagsare case sensitive  
d.XML elements must be properly nested  
27.XML elements cannot be empty  
a.False R  
b.True  
28.Which is not a correct name for an XML element?  
a.<1dollar> R  
b.<h1>  
c.<Note>  
d.All 3 names are incorrect  
28.For the XML parser to ignore a certainsection of your XML document, which syntax is correct?  
a.![CDATA[Text to be ignored ]]>  
R
b.<CDATA> Text to be ignored </CDATA>  
c.<xml:CDATA[Text to be ignored ]>  
d.<PCDATA> Text to be ignored </PCDATA>  
29.What are XML entities used for?  
a.Entitiesdefine shortcuts to standard text or special characters R  
bEntities define shortcuts to standard elements  
c.Entitiesdefine shortcuts to standard attributes  
30. Which XML DOM object represents a node in the node tree?  
a.The node object  
R
b.The nodeList object  
c.The document object  
1._______________ isused to convert your application into Web-Application.  
a. Java Service  
b.Browser Action  
c. Web Services R  
d. Struts Services  
2.Web Services are _______________.  
a.Application Designing Tool  
b.Application IDE  
c.Application Components R  
d.None of these  
3.The basic Web Services platform is combination of _____ and _______.  
a.CSS + JAVA  
b.CSS + HTTP  
c.XML + HTTP R  
d.XML + HTML  
4.Web services communicate using __________.  
a.Open protocols  
R
b.Open-Close protocols  
c.Close protocols  
d.None of these  
5.Web services are self-contained and self-describing.  
a.False  
b.True R  
6.Web services can be discovered using ________.  
a.UDDII  
b.UDDI R  
c.UDII  
d.UDDDI  
7.__________ is the basis for Web services.  
a.PHP  
b.CSS  
c.CGI  
d.XML R  
8.Which of the following is considered as Web Service Platform Elements ?  
a.SOAP  
b.UDDI  
c.WSDL  
d.All of these R  
9.WSDL Stands for ______________________.  
a.WebServices Description Language R  
b.Web Services DesignLanguage  
c.Web Services Development Language  
d.None of these  
10.UDDI Standsfor ______________________.  
a.UniversalDevelopment, Designand Integration  
b.Universal Description, Discovery and Integration R  
c.Universal Description, Development and Integration  
11.Acronymn of SOAP is ______________.  
a.Simplified Object ArbitaryProtocol  
b.Secure Object Access Protocol  
c.Simple Object Access Protocol  
d.None of these  
R
12.Web-services were developed in order to interact _____________ .  
a.Server  
b.Browsers  
c.Different platforms R  
13.Web services use ________ to code and to decode data.  
a.XML R  
b.SOAP  
c.UDDI  
d.None of these  
14.Web Services is used to -  
a.Connect existing software  
b.Reuse application-components.  
c.Solve the interoperability problem  
d. All of these  
R
15.SOAP is an _________ tolet applications exchange information over HTTP.  
a.XML-basedprotocol R  
b.JAVA-based protocol  
c.PHP-based protocol  
d.NET-based protocol  
16.SOAP is a _________.  
a.Protocol  
b.Markup  
c.Carrier  
R
d.Language  
17.SOAP is platform ___________.  
a.Dependent  
b.Independent  
c.None  
R
18.SOAP is a format for sending messages and is also called as __________.  
a.Data Transfer protocol  
b.Communication protocol  
c.Networkprotocol  
R
d.None of these  
19.SOAP is a W3C standard ! (True / False)  
a.False  
b.True R  
20._________ is a directory for storing information about web services.  
a.SOAP  
b.CGI  
c.UDDI R  
d.HTTP  
21.XML digital signaturesprovides  
a.Authentication  
b.Authorization  
c.Confidentiality R  
d.Integrity  
22.What is RPC?  
a.Remote Process control  
b.Remote Procedure call R  
c.Rempte Protocol control  
22.What is SSL?  
a.Secure Socket Layer R  
b.Secured Socket Layer  
c.StandardSecured Layer  
d.StandardSocket Layer  
23.Select the communication channel not used in ws  
a.HTTP/POST  
b.MIME  
c.SOAP  
R
d.HTTP/GET  
24.What is not a part of soap message?  
a.Soap body  
b.Soap envelope  
c.Soap headers  
d.Soap footer  
R
25.Which of the following component of HTTP response contains metadata for the HTTPResponse  
message as key-value pairs?  
a. Status/Response Code  
b. HTTPVersion  
c. Response Header  
d. Response Body  
R
26. Which of the following HTTP method should be readonly in nature?  
a.GET  
R
b.DELETE  
c.POST  
d.PUT  
27. Which of the following directive of Cache Control Header of HTTPresponse indicates that  
resource is not cachable?  
a.Public  
b.Private  
c.no-cache/no-store  
d.max-age  
R
28.Which of the following HTTPStatus code means NO CONTENT, when response body is empty for  
example, a DELETE request?  
a. 200  
b. 201  
c. 204  
d. 304  
R
29.Which of the following annotation of JAX RS API is used to annotate a method used to  
create/update resource?  
a. @Path  
b. @GET  
c. @PUT R  
d.@POST  
30. RESTfulweb services make use of FTP protocol as a medium of communication betweenclient  
and server.  
a.True  
b.False  
R
31.Response Header - Contains metadata for the HTTPResponse message as key-value pairs.  
a.True R  
b.False  
32.Which of the following layer in Web Service Protocol Stack is responsible for centralizing services  
into a common registryand providing easy publish/find centralizing services into a common registry  
and providing easy publish/find functionality?  
a.Service Transport  
b.XML Messaging  
c.Service Description  
d.Service Discovery  
R
33.Annotation which allows the Jaxb2Marshaller marshaller to detect a class’s (i.e., object’s) fields.  
a. XmlRootElement R  
b. XmlRoot  
c. NotNull  
d. None of the mentioned  
34.Which of the following is correct about URI in RESTful web services?  
a. Each resource in REST architecture is identified by its URI  
b. Purpose of an URI is to locate a resource(s) on the server hosting the web service  
c. Both of the above  
d. None of the above  
R
35. Annotation added as an input parameter to the handler method  
a. PathParam R  
b. Path  
c PathLocale  
d. None of the mentioned  
36. Eachresource in REST architecture is identified by its URI.  
a.True R  
b.False  
37. Explain featuresof XML-RPC?  
a. RPCs are performed using simple XML language  
b. XML encoded Requests are sent via HTTPPOST  
c. XML Response is embedded in HTTPresponse  
d. All of the above R  
38.XML tag which represents information relatedto a REST service’s request.  
a. Result  
b. Title  
c. a&b R  
d. None  
39.Some common Resources representationsused in REST are  
a.JSON  
b.YAML  
c.XML  
d.HTML  
e. All the above R  
40.RESTfulweb services ?  
a. Defines its own security.  
b. Inherits security measures from the underlying transport. R  
c. Both of the above  
d. None of the above  
41.What is/are the advantagesof RESTful Web Services.?  
a. Language and Platformindependent  
b. REST can use SOAP  
R-A C  
c. Permits different data format  
d. All of the above  
42.Which of the following annotation of JAX RS API statesthe HTTPResponse generatedby web  
service?  
a. @DELETE  
b. @HEAD  
c. @Produces  
d. @Consumes  
R